function ret = trainNet(trainingSet, nValue, f, times, learningRate)

w = rand(6,1);

while(times-- > 0)
for i = (1:size(trainingSet)(1))

	mu = normalizeInput(trainingSet(i,1:5)', nValue);
	S_mu = trainingSet(i,6);
	o_mu = simplePerceptron5(mu, w, f);

	
	if(!equals(S_mu,o_mu))
		delta_w = learningRate*(S_mu - o_mu).*mu;
		w = w .+ delta_w;
	endif

endfor
endwhile

ret = w;

endfunction
